package com.pengxun.manager.enums;

/**
 * @author zhongzhu
 * @Title: kpd-platform
 * @Package com.pengxun.manager.enums
 * @Description:
 * @date 2019/4/2316:41
 */
public enum PackageStatusEnum {

    DISABLE(0,"已禁用"),
    ENABLE(1,"已启用"),
    DELETED(-1,"已删除"),


    ;

    private Integer type;

    private String desc;

    public static PackageStatusEnum getEnumByType(Integer type){
        PackageStatusEnum[] enums = PackageStatusEnum.values();
        for(PackageStatusEnum packageStatusEnum :enums){
            if(type  == packageStatusEnum.getType()){
                return  packageStatusEnum;
            }
        }
        return null;
    }

    PackageStatusEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
